View Javadoc
1 /* Generated By:JJTree: Do not edit this line. JavaClassDeclaration.java */ 2 3 package net.sourceforge.jane.jjtree; 4 5 import java.util.HashSet; 6 import java.util.Set; 7 8 public class JavaClassDeclaration extends SimpleNode 9 implements JavaParserConstants { 10 11 private Token startToken; 12 private Modifiers modifiers; 13 14 public JavaClassDeclaration(int id) { 15 super(id); 16 } 17 18 public JavaClassDeclaration(JavaParser p, int id) { 19 super(p, id); 20 } 21 22 public void jjtOpen() { 23 startToken = parser.getToken(0); 24 } 25 26 public void jjtClose() { 27 modifiers = Modifiers.newInstance(startToken, parser.getToken(0)); 28 startToken = null; 29 } 30 31 /*** Accept the visitor. **/ 32 public Object jjtAccept(JavaParserVisitor visitor, Object data) { 33 return visitor.visit(this, data); 34 } 35 36 /*** 37 * Returns the name of this class. 38 */ 39 public String getName() { 40 return getUnmodifiedClassDeclaration().getName(); 41 } 42 43 /*** 44 * Returns the modifiers for this class. 45 */ 46 public Modifiers getModifiers() { 47 return modifiers; 48 } 49 50 /*** 51 * Returns the name of the super class. 52 */ 53 public String getSuperClass() { 54 return getUnmodifiedClassDeclaration().getSuperClass(); 55 } 56 57 /*** 58 * Returns the list of interfaces. 59 */ 60 public String[] getInterfaces() { 61 return getUnmodifiedClassDeclaration().getInterfaces(); 62 } 63 64 /*** 65 * Returns the class body. 66 */ 67 public JavaClassBody getClassBody() { 68 return getUnmodifiedClassDeclaration().getClassBody(); 69 } 70 71 private JavaUnmodifiedClassDeclaration getUnmodifiedClassDeclaration() { 72 return (JavaUnmodifiedClassDeclaration) 73 JJTreeUtils.findFirstChild(this, JavaUnmodifiedClassDeclaration.class); 74 } 75 76 }

This page was automatically generated by Maven